home *** CD-ROM | disk | FTP | other *** search
- ; GRAPHICS MODE FOR C FUNCTION
- ; GRAPHICS MODE CHANGE ROUTINE
-
- name _gmode
-
- public _gmode
-
- DGROUP group _DATA
- assume ds:DGROUP
-
- _DATA segment word public 'DATA'
- _gtable db 35h,2dh,2eh,07h,5bh,02h,57h,57h
- db 02h,03h,00h,00h,00h,00h,00h,00h
- _DATA ends
-
-
- _TEXT segment byte public 'CODE'
- assume cs:_TEXT
-
- _gmode proc near
- push bp
- mov bp, sp
- push es
- push di
- push si
- mov dx, 3bfh
- mov al, 3
- out dx, al
- mov dx,03b8h
- mov al,0a2h
- out dx,al
- mov dx,03b4h
- mov ah,00
- lea si, _gtable
- mov cx,0010h
- hg199: mov al,ah
- out dx,al
- inc dx
- mov al, [si]
- out dx,al
- inc ah
- dec dx
- inc si
- loop hg199
- mov ax,0b800h
- mov es,ax
- mov cx,4000h
- mov di,0
- mov ax,0
- cld
- repz stosw
- mov dx,03bah
- mov cx,5
- hg1be: in al,dx
- or al,al
- js hg1c5
- jmp hg1be
- hg1c5: in al,dx
- or al,al
- jns hg1cc
- jmp hg1c5
- hg1cc: loop hg1be
- mov dx,03b8h
- mov al,0aah
- out dx,al
- pop si
- pop di
- pop es
- mov sp, bp
- pop bp
- ret
- _gmode endp
-
- _TEXT ends
- end
-
-
-